﻿
#pragma once

#include <string.h>

#include <pcap/pcap.h>
#include <pcap/bpf.h> 

#include <sys/socket.h>
#include <sys/ioctl.h>
#include <net/if.h>

#include <string>
using std::string;

typedef struct PcapInfo {
    PcapInfo(string name, string desc, unsigned char mac_addr[6]) : name(name), desc(desc) {
    	memcpy(this->mac_addr, mac_addr, 6);
    }
    string name;
    string desc;
    unsigned char mac_addr[6];
} PcapInfo;

int rpcap_open(PcapInfo info, pcap_t*& _pcap);
void rpcap_loop(PcapInfo* info, pcap_t *pcap);
